.boards {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 30px 0;
}

.board-wrap {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
}

@media (min-width: 1100px) {
  .board-wrap {
    max-width: 500px;
  }
}

.board-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.grid {
  display: grid;
  grid-template-columns: repeat(10, 40px);
  grid-template-rows: repeat(10, 40px);
  gap: 1px;
  background: #333;
  padding: 1px;
  border: 2px solid #555;
  max-width: 410px;
}

.cell {
  background: #87CEEB;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  user-select: none;
}

.cell:hover {
  background: #5F9EA0;
}

.cell.ship {
  background: #4682B4;
}

.cell.hit {
  background: #FF4444;
}

.cell.miss {
  background: #DDD;
}

.cell-preview {
  background: #98FB98 !important;
}

.controls, .status {
  text-align: center;
  margin: 20px;
  padding: 10px;
  background: white;
  border-radius: 8px;
}

button {
  padding: 8px 16px;
  margin: 4px;
  border: none;
  background: #4CAF50;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background: #45a049;
}

button:disabled {
  background: #cccccc;
  cursor: not-allowed;
}

button.secondary {
  background: #008CBA;
}

.info {
  font-size: 18px;
  margin: 10px;
  font-weight: bold;
}

/* Легенда цветов для исторических событий */
.color-legend {
  margin-top: 15px;
  font-size: 14px;
  color: #666;
  text-align: center;
}

.green-dot, .red-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 5px;
}

.green-dot {
  background: #4CAF50;
}

.red-dot {
  background: #ff4444;
}